<div class="box">
    
  <div class="box-header">

    <div class="row">
        <div class="col-sm-5">
        	<!--<ob_link><a class="btn export" url="{:url('xiaofeiexcel')}"><i class="fa fa-download"></i> 导 出</a></ob_link>-->
        	<div class="input-group input-group-sm">
                <form action="{:url('xiaofeiexcel')}" method="post" class="form_single">
                <select name="create_time" style="width: 200px;" class="form-control pull-right">
                    <option value="">全部</option>
                    <option value="yesterday">昨天</option>
                    <option value="today">今天</option>
                    <option value="week">最近一周</option>
                    <option value="month">最近一月</option>

                </select>
                <div class="input-group-btn">
                    <button type="submit" class="btn btn-info btn-flat"><i class="fa fa-download"></i> 导 出</button>
                </div>

                </form>
            </div>
        </div>
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">


                    <select name="search_engine" class="form-control pull-right" style="width: 200px;" >
                        <option value="">请选择搜索引擎</option>
                        <option value="baidupc" {eq name=":urldecode(input('search_engine'))" value="baidupc" } selected = "selected" {/eq} >百度</option>
                        <option value="baidumobile" {eq name=":urldecode(input('search_engine'))" value="baidumobile" } selected = "selected" {/eq} >百度移动端</option>
                        <option value="360pc" {eq name=":urldecode(input('search_engine'))" value="360pc" } selected = "selected" {/eq} >360</option>
                        <option value="360mobile" {eq name=":urldecode(input('search_engine'))" value="360mobile" } selected = "selected" {/eq} >360移动端</option>
                        <option value="sogoupc" {eq name=":urldecode(input('search_engine'))" value="sogoupc" } selected = "selected" {/eq} >搜狗</option>
                        <option value="sougoumobile" {eq name=":input('search_engine')" value="sogoumobile" } selected = "selected" {/eq} >搜狗移动端</option>
                        <option value="smmobile" {eq name=":input('search_engine')" value="smmobile" } selected = "selected" {/eq} >神马搜索</option>

                    </select>

                    <input class="form-control pull-right" style="width: 200px;" id="test" name="create_time" placeholder="请选择时间"  value="{:input('create_time')}" type="text">

                    <input type="text" name="search_keyword" style="width: 200px;" class="form-control pull-right" value="{:urldecode(input('search_keyword'))}" placeholder="输入网站关键词搜索">

                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="{:input('search_data')}" placeholder="请输入域名搜索">

                    <div class="input-group-btn">
                      <button type="button" id="search"  url="{:url('xiaofeilist')}" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>

                </div>
           </div>
        </div>
    </div>
    
  </div>
    
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>搜索引擎</th>
          <th>关键词</th>
          <th>金额</th>
          <th>日期</th>
          <th>排名</th>
          <th>域名</th>
          <th>用户名</th>
          <th>截图查看</th>
          <th>历史查询</th>
      </tr>
      </thead>
      
      {notempty name='list["0"]["id"]'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>

                  <td>
                      {eq name="$vo.search_engine" value="baidumobile" } <span class="label" style="background-color: #ef5350"> 百度移动端</span>  {/eq}
                      {eq name="$vo.search_engine" value="baidupc" } <span class="label" style="background-color: #33ca35"> 百度</span> {/eq}
                      {eq name="$vo.search_engine" value="360pc" }<span class="label" style="background-color: #4484ca"> 360</span> {/eq}
                      {eq name="$vo.search_engine" value="360mobile" } <span class="label" style="background-color: #f72f8e"> 360手机端</span>{/eq}
                      {eq name="$vo.search_engine" value="sogoupc" } <span class="label" style="background-color: #bf8fca"> 搜狗</span>{/eq}
                      {eq name="$vo.search_engine" value="sogoumobile" } <span class="label" style="background-color: #66b5ca"> 搜狗移动端</span>{/eq}
                      {eq name="$vo.search_engine" value="smmobile" } <span class="label" style="background-color: #f732bc"> 神马搜索</span>{/eq}

                  </td>

                  <td>{$vo.keyword_name}</td>
                  <td>-{$vo.price}</td>
                  <td>{$vo.create_time}</td>
                    <td>{$vo.rank}</td>
                  <td>{$vo.url}</td>
                    <td>{$vo.username}</td>
                    <td>
                        {notempty name='$vo.img_url'}
                        <span class="label"><a href="{$vo.img_url}" target="_blank">查看截图</a></span>
                        {else/}
                        <span class="label" style="color: red;">手动补录排名没有截图</span>
                        {/notempty}
                    </td>
                    <td>
                        <ob_link> <a class="btn" target="_blank" href="{:url('keywordlistlog')}?search_engine={$vo.search_engine}&search_keyword={$vo.keyword_name}&search_data={$vo.url}"><i class="fa fa-fw fa-file-text"></i>历史记录</a></ob_link>
                    </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
  </div>

  <div class="box-footer clearfix text-center">
      {$list->render()}
  </div>

</div>

<script>
    //导出功能
    $(".export").click(function(){
        
        window.location.href = searchFormUrl($(".export"));
    });
</script>
<script>
    laydate.render({
        elem: '#test'
        ,type: 'date'
    });

</script>